package com.czl.module_storehouse.bean;

import com.czl.base.data.bean.tengyun.BorrowBean;
import com.czl.base.data.bean.tengyun.ProductBean;
import com.czl.base.data.bean.tengyun.SortBean;

import java.util.List;

public class BorrowInfoBean {

    private int storehouseId;
    private int applyId;
    private int borrowPersonId;
    private Integer borrowOrganizationId;
    private String borrowPersonName;
    private String borrowCompanyShortName;
    private String borrowCompanyName;
    private Integer borrowCompanyId;
    private String moReturnDate;
    private String operaterId;
    private String operaterName;
    private String borrowComment;
    private String applyComment;
    private String note;
    private String borrowApprover;
    private BorrowBean mBorrowBean;
    private List<SortBean> sortList;
    private List<ProductBean> productList;

    public BorrowBean getBorrowBean() {
        return mBorrowBean;
    }

    public void setBorrowBean(BorrowBean borrowBean) {
        if (borrowBean == null) {
            return;
        }
        this.applyId = borrowBean.getApplyId();
        this.borrowPersonId = borrowBean.getBorrowPersonId();
        this.borrowPersonName = borrowBean.getBorrowPersonName();
        this.moReturnDate = borrowBean.getMoReturnDate();
        this.borrowComment = borrowBean.getBorrowComment();
        this.applyComment = borrowBean.getApplyComment();
        this.borrowApprover = borrowBean.getApproveUserName();
        this.borrowCompanyName = borrowBean.getBorrowCompanyName();
    }

    public Integer getBorrowOrganizationId() {
        return borrowOrganizationId;
    }

    public void setBorrowOrganizationId(Integer borrowOrganizationId) {
        this.borrowOrganizationId = borrowOrganizationId;
    }

    public String getBorrowCompanyShortName() {
        return borrowCompanyShortName;
    }

    public void setBorrowCompanyShortName(String borrowCompanyShortName) {
        this.borrowCompanyShortName = borrowCompanyShortName;
    }

    public String getBorrowCompanyName() {
        return borrowCompanyName;
    }

    public void setBorrowCompanyName(String borrowCompanyName) {
        this.borrowCompanyName = borrowCompanyName;
    }

    public String getBorrowApprover() {
        return borrowApprover;
    }

    public void setBorrowApprover(String borrowApprover) {
        this.borrowApprover = borrowApprover;
    }

    public int getStorehouseId() {
        return storehouseId;
    }

    public void setStorehouseId(int storehouseId) {
        this.storehouseId = storehouseId;
    }

    public int getBorrowPersonId() {
        return borrowPersonId;
    }

    public void setBorrowPersonId(int borrowPersonId) {
        this.borrowPersonId = borrowPersonId;
    }

    public String getBorrowPersonName() {
        return borrowPersonName;
    }

    public void setBorrowPersonName(String borrowPersonName) {
        this.borrowPersonName = borrowPersonName;
    }

    public Integer getBorrowCompanyId() {
        return borrowCompanyId;
    }

    public void setBorrowCompanyId(Integer borrowCompanyId) {
        this.borrowCompanyId = borrowCompanyId;
    }

    public String getMoReturnDate() {
        return moReturnDate;
    }

    public void setMoReturnDate(String moReturnDate) {
        this.moReturnDate = moReturnDate;
    }

    public String getOperaterId() {
        return operaterId;
    }

    public void setOperaterId(String operaterId) {
        this.operaterId = operaterId;
    }

    public String getOperaterName() {
        return operaterName;
    }

    public void setOperaterName(String operaterName) {
        this.operaterName = operaterName;
    }

    public String getBorrowComment() {
        return borrowComment;
    }

    public void setBorrowComment(String borrowComment) {
        this.borrowComment = borrowComment;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getApplyComment() {
        if (applyComment == null || applyComment.isEmpty()) {
            applyComment = getNote();
        }
        return applyComment == null ? "" : applyComment;
    }

    public void setApplyComment(String applyComment) {
        this.applyComment = applyComment;
    }

    public List<SortBean> getSortList() {
        return sortList;
    }

    public void setSortList(List<SortBean> sortList) {
        this.sortList = sortList;
    }

    public List<ProductBean> getProductList() {
        return productList;
    }

    public void setProductList(List<ProductBean> productList) {
        this.productList = productList;
    }
}
